<div class="box"> <!-- Box begins here -->
	<h2>Thêm người quản trị</h2>
	<!--
	Standard form within a fieldset tag;
-->
	<?php 
		$error = $this->error;
		$data = $this->data;
	?>
<form method="post" action="" enctype="multipart/form-data"><!-- Form -->
				<?php 
					if(isset($this->success)){
						echo "<div class='success'><center><h3>".$this->success."</h3></center></div>";					
					}
				?>
				<fieldset><legend>Thêm một thông tin đăng nhập</legend>
				
					<div class="input_field">
						<label for="username">Tên Đăng Nhập</label>
 												
 						<?php echo $this->formText("username",$data['username'],null); ?>
 						<?php 
 							if(isset($error['username'])){
							echo '<span class="validate_error">'.$error['username'].'</span>';
							}
 						?>
					</div>
					<div class="input_field">
						<label for="fullname">Tên đầy đủ</label>						
 						<?php echo $this->formText("fullname",$data['fullname'],null); ?>
					</div>
					<div class="input_field">
						<label for="email">Email</label>
 						
						
 						<?php echo $this->formText("email",$data['email'],null); ?>
 						<?php 
 							if(isset($error['email'])){
							echo '<span class="validate_error">'.$error['email'].'</span>';
							}
 						?>
					</div>
					<div class="input_field">
						<label for="password">Mật khẩu</label>
 						
 						<?php echo $this->formPassword("password","",""); ?>
 						
 						<?php 
 							if(isset($error['password'])){
							echo '<span class="validate_error">'.$error['password'].'</span>';
							}
 						?>
					</div>
					<div class="input_field">
						<label for="repass">Nhập lại mật khẩu</label>

 						<?php echo $this->formPassword("repass","",""); ?>
 						
 						<?php 
 							if(isset($error['repass'])){
							echo '<span class="validate_error">'.$error['repass'].'</span>';
							}
 						?>
					</div>
					<div class="input_field">
						<label for="image">Hình ảnh</label>
 						<?php echo  $this->formFile("image",array("size"=>55));?>
 						<?php if(!empty($this->error['image'])): ?>
 						<span class="validate_error"><?php echo $this->error['image']; ?></span>
 						<?php endif; ?>
					</div>
					<div class="input_field">
						<label for="sex">Giới tính</label>
						
 						<select name="sex">
 							<option value="0">Nam</option>
 							<option value="1" <?php if($data['sex']=='1') echo 'selected="selected"'?>>Nữ</option>
 						</select>
					</div>
					<div class="input_field">
						<label for="role">Quyền </label>
 						<select name="role">
 							<?php 
 								$model = new Model_WebmasterRole_WebmasterRole();
 								$role = $model->getAll();
 								foreach ($role as $item)
 								{
 							?>
 							<option value="<?php echo $item['id'];?>"><?php echo $item['name'];?></option>
 							<?php }?>
 						</select>
					</div>
					<div class="input_field">
						<label for="name">Trạng thái</label>
 							<?php echo $this->formRadio("status",(empty($data['status'])) ? "1" : $data[status],null,array("1"=>"Kích hoặt","2"=>"Chờ duyệt","0"=>"Không kich hoặt"),null); ?>
 							<br />
 							<br />
 							 
	 						
					</div>
					
					<input class="submit" type="submit" value="Lưu" />
				</fieldset>
			</form><!-- /Form -->
</div> <!-- END Box-->